package com.juzi.wopu.query;

import org.apache.commons.lang3.StringUtils;

public class CartPlaceQuery extends BaseQuery{
	private String name;
	
	private Long iCompany;

	public CartPlaceQuery() {
		super("CartPlace");
	}
	
	@Override
	protected void addWhere() {
		if (StringUtils.isNotBlank(name)) {
			AddWhere("o.name like ?", "%" + name + "%");
		}
		
		if (iCompany!=null && iCompany!=-1L) {
			AddWhere("o.iCompany = ?", iCompany);
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getiCompany() {
		return iCompany;
	}

	public void setiCompany(Long iCompany) {
		this.iCompany = iCompany;
	}
}
